package com.xiaoyushu.note.biz.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

@Getter
@AllArgsConstructor
public enum NoteUnlikeLuaResultEnum {
    //布隆过滤器不存在
    NOT_EXIST(-1L),
    //笔记 已点赞
    NOTE_LIKED(1L),
    //笔记未点赞
    NOTE_NOT_LIKED(0L),;

    private final Long code;

    public static  NoteUnlikeLuaResultEnum valueOf(Long code){
        for (NoteUnlikeLuaResultEnum noteUnlikeLuaResultEnum:NoteUnlikeLuaResultEnum.values()){
            if (Objects.equals(code,noteUnlikeLuaResultEnum.getCode())){
                return noteUnlikeLuaResultEnum;
            }
        }
        return null;
    }
}
